CREATE TABLE "iws_mes_nest"
(
    "item_bar_code"      VARCHAR(50) PRIMARY KEY,
    "material_code"      VARCHAR(50) NULL DEFAULT NULL,
    "material_name"      VARCHAR(50) NULL DEFAULT NULL,
    "inventory_quantity" FLOAT       NULL DEFAULT NULL,
    "unit"               VARCHAR(50) NULL DEFAULT NULL,
    "specs"              VARCHAR(50) NULL DEFAULT NULL,
    "batch_code"         VARCHAR(50) NULL DEFAULT NULL,
    "disable"            INT         NULL DEFAULT NULL,
    "disable_date"       DATETIME    NULL DEFAULT NULL,
    "disable_des"        VARCHAR(50) NULL DEFAULT NULL,
    "disable_notes"      VARCHAR(50) NULL DEFAULT NULL,
    "abnormal"           VARCHAR(50) NULL DEFAULT NULL,
    "create_date"         DATETIME    NULL DEFAULT NULL,

    "manufacturers"      VARCHAR(50) NULL DEFAULT NULL,
    "container_code"     VARCHAR(50) NULL DEFAULT NULL,
    "material_category"  VARCHAR(50) NULL DEFAULT NULL,
    "material"           VARCHAR(50) NULL DEFAULT NULL,
    "entry_time"         DATETIME    NULL DEFAULT NULL,
    "supplier_customer"  VARCHAR(50) NULL DEFAULT NULL,
    "warehouse"          VARCHAR(50) NULL DEFAULT NULL,
    "issue_position"     VARCHAR(50) NULL DEFAULT NULL,
    "operator"           VARCHAR(50) NULL DEFAULT NULL,
    "operation_time"     DATETIME    NULL DEFAULT NULL,
    "color"              VARCHAR(50) NULL DEFAULT NULL,
    "measurement_method" VARCHAR(50) NULL DEFAULT NULL,
    "meedle_count"       VARCHAR(50) NULL DEFAULT NULL,
    "size"               VARCHAR(50) NULL DEFAULT NULL,
    "size_page"          VARCHAR(50) NULL DEFAULT NULL,
    "working_no"         VARCHAR(50) NULL DEFAULT NULL,
    "product_type"       VARCHAR(50) NULL DEFAULT NULL,
    "packaging_method"   VARCHAR(50) NULL DEFAULT NULL,
    "special_process"    VARCHAR(50) NULL DEFAULT NULL,
    "program_name"       VARCHAR(50) NULL DEFAULT NULL,
    "weaving_machine"    VARCHAR(50) NULL DEFAULT NULL,
    "hcbanderole"        VARCHAR(50) NULL DEFAULT NULL,
    "composition"        VARCHAR(50) NULL DEFAULT NULL,
    "qclab"              VARCHAR(50) NULL DEFAULT NULL,
    "packaging_ratio"    VARCHAR(50) NULL DEFAULT NULL,

    "self_check_status"    VARCHAR(50) NULL DEFAULT NULL,
    "cylinder_number"    VARCHAR(50) NULL DEFAULT NULL,
    "purchase_order"    VARCHAR(50) NULL DEFAULT NULL,
);

exec sp_addextendedproperty 'MS_Description', N'物料的唯一标识', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'item_bar_code'
go
exec sp_addextendedproperty 'MS_Description', N'物料的编号', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'material_code'
go
exec sp_addextendedproperty 'MS_Description', N'物料的名称', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'material_name'
go
exec sp_addextendedproperty 'MS_Description', N'物料的数量', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'inventory_quantity'
go
exec sp_addextendedproperty 'MS_Description', N'物料的计量单位', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'unit'
go
exec sp_addextendedproperty 'MS_Description', N'物料的规格描述', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'specs'
go
exec sp_addextendedproperty 'MS_Description', N'物料的批次号', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'batch_code'
go
exec sp_addextendedproperty 'MS_Description', N'冻结（1冻结/0正常）', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'disable'
go
exec sp_addextendedproperty 'MS_Description', N'冻结时间', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'disable_date'
go
exec sp_addextendedproperty 'MS_Description', N'冻结原因', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'disable_des'
go
exec sp_addextendedproperty 'MS_Description', N'冻结备注', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'disable_notes'
go
exec sp_addextendedproperty 'MS_Description', N'异常状态标记', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'abnormal'
go
exec sp_addextendedproperty 'MS_Description', N'入库时间', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'create_date'
go


exec sp_addextendedproperty 'MS_Description', N'原物料的生产厂家', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'manufacturers'
go
exec sp_addextendedproperty 'MS_Description', N'用于标识载具的唯一编码', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'container_code'
go
exec sp_addextendedproperty 'MS_Description', N'原料、辅料、半成品', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'material_category'
go
exec sp_addextendedproperty 'MS_Description', N'3F 1.在制品 2.实体物料', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'material'
go
exec sp_addextendedproperty 'MS_Description', N'入厂时间', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'entry_time'
go
exec sp_addextendedproperty 'MS_Description', N'半成品', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'supplier_customer'
go
exec sp_addextendedproperty 'MS_Description', N'仓库', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'warehouse'
go
exec sp_addextendedproperty 'MS_Description', N'发出仓位', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'issue_position'
go
exec sp_addextendedproperty 'MS_Description', N'操作人', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'operator'
go
exec sp_addextendedproperty 'MS_Description', N'操作时间', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'operation_time'
go
exec sp_addextendedproperty 'MS_Description', N'Color', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'color'
go
exec sp_addextendedproperty 'MS_Description', N'MeasurementMethod', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'measurement_method'
go
exec sp_addextendedproperty 'MS_Description', N'MeedleCount', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'meedle_count'
go
exec sp_addextendedproperty 'MS_Description', N'Size', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'size'
go
exec sp_addextendedproperty 'MS_Description', N'SizePage', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'size_page'
go
exec sp_addextendedproperty 'MS_Description', N'WorkingNo', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'working_no'
go
exec sp_addextendedproperty 'MS_Description', N'产品类型', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'product_type'
go
exec sp_addextendedproperty 'MS_Description', N'包装方式', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'packaging_method'
go
exec sp_addextendedproperty 'MS_Description', N'特殊工艺', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'special_process'
go
exec sp_addextendedproperty 'MS_Description', N'程式名', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'program_name'
go
exec sp_addextendedproperty 'MS_Description', N'编织机器', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'weaving_machine'
go
exec sp_addextendedproperty 'MS_Description', N'HCBanderole', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'hcbanderole'
go
exec sp_addextendedproperty 'MS_Description', N'composition', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'composition'
go
exec sp_addextendedproperty 'MS_Description', N'Qclab', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'qclab'
go
exec sp_addextendedproperty 'MS_Description', N'包装配比', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'packaging_ratio'
go


exec sp_addextendedproperty 'MS_Description', N'自检状态(1自检)', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'self_check_status'
go
exec sp_addextendedproperty 'MS_Description', N'缸号', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'cylinder_number'
go
exec sp_addextendedproperty 'MS_Description', N'采购单', 'SCHEMA', 'dbo',
     'TABLE', 'iws_mes_nest', 'COLUMN', 'purchase_order'
go